<template>
	<view>
		<!--二维码信息-->
		<weapp-qrcode v-if="!(webUserInfo && webUserInfo.job[0]==6)" :text="Text" :title="title"></weapp-qrcode>
		<!--车辆预约信息 cartype!=='2'-->
		<BookingCarDetail v-if="!!bookingCarDetail.carcode" ref="bookingCarDetail" :item="bookingCarDetail"></BookingCarDetail>
		<BookingPersonDetail v-else ref="bookingCarDetail" :item="bookingCarDetail"></BookingPersonDetail>
	</view>
</template>

<script>
	import BookingPersonDetail from "@/pages/booking/components/booking-car/booking-person-detail.vue"
	import BookingCarDetail from "@/pages/booking/components/booking-car/booking-car-detail.vue"
	import {
		Platform,
		Storage_Key,
	} from '@/static/config.js'
	export default {
		components: {
			BookingCarDetail,BookingPersonDetail
		},
		computed: {
			webUserInfo() {
				return this.$storage.get(Storage_Key.web_user_info, true);
			},
		},
		data() {
			return {
				title: '我的进出码',
				Text: "",
				cardDetail: {},
				bookingCarDetail: {},
			}
		},
		onLoad(options) {
			if (options && options.item) {
				this.bookingCarDetail =Object.assign({}, JSON.parse(decodeURIComponent(options.item)));
				this.Text = Platform.tag+','+this.bookingCarDetail.id + "," + this.bookingCarDetail.carcode + "," + this.bookingCarDetail.color +',' + this.bookingCarDetail.driver;
				this.title=this.bookingCarDetail.createtime;
			}
		},
		methods: {

		}
	}
</script>

<style>

</style>
